// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
Vue.config.productionTip = false;

import iView from 'iview';
import 'iview/dist/styles/iview.css';
Vue.use(iView);
import Vuex from 'vuex'
Vue.use(Vuex);

import API from '@/api/'
import helps from '@/api/parts'
import vuexjs from '@/api/vuex'
import imgfactory from '@/imageFactory/image'
import downLoad from 'js-file-download'
Vue.prototype.$downLoad = downLoad;

import Getimage from '@/imageFactory/Getimage'
Vue.use(Getimage);
import ENV from './ENV'
Vue.prototype.$ENV = ENV;

Vue.prototype.$img = new imgfactory();
Vue.prototype.$h = helps;
Vue.prototype.http = new API;
const store = new Vuex.Store({
  modules: {
    attribute: vuexjs.moduleClientRoute,   //存放属性
    array: vuexjs.moduleClientarray       //存放数组
  }
});
import VueQuillEditor from 'vue-quill-editor'

Vue.use(VueQuillEditor, /* { default global options } */);

/* eslint-disable no-new */
var text = () => {
  setTimeout(() => {
    if (Vue.prototype.$imgList) {
      new Vue({
        el: '#app',
        router,
        store,
        template: '<App/>',
        components: {App}
      });
    } else {
      text();
    }
  }, 1)
};

text();
